home *** CD-ROM | disk | FTP | other *** search
/ Champak 41 / Volume 41 - JOGO DISK .iso / Games / konka_66.swf / scripts / DefineSprite_310_gj / frame_1 / DoAction.as
Text File  |  2007-05-10  |  520b  |  29 lines

  1. _width = 47;
  2. _height = 51;
  3. var cc = _xscale;
  4. speed = 25;
  5. this.onEnterFrame = function()
  6. {
  7.    this.swapDepths(100000 + _Y * 100 + id % 100);
  8.    if(f == 0)
  9.    {
  10.       _xscale = cc;
  11.       _X = _X - speed;
  12.    }
  13.    else
  14.    {
  15.       _xscale = - cc;
  16.       _X = _X + speed;
  17.    }
  18.    if(_X < 0 || _X > 450)
  19.    {
  20.       this.removeMovieClip();
  21.    }
  22.    if(hit.hitTest(_parent.man.shenzi))
  23.    {
  24.       _root.nhp -= _root.diatk + 4;
  25.       _parent.man.gotoAndPlay("σÇÆ");
  26.       this.removeMovieClip();
  27.    }
  28. };
  29.